x86/HVM: don't mark external IRQs as pending when vLAPIC is disabled
authorJan Beulich <jbeulich@suse.com>
Tue, 20 Dec 2022 12:44:07 +0000 (13:44 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 20 Dec 2022 12:44:07 +0000 (13:44 +0100)
commit54bb56e12868100c5ce06e33b4f57b6b2b8f37b9
treeb5367d13fa1b4a9a9d14c57f62372f66963c9791
parentb7b34bd66ac77326bb49b10130013b4a9f83e4a2
x86/HVM: don't mark external IRQs as pending when vLAPIC is disabled

In software-disabled state an LAPIC does not accept any interrupt
requests and hence no IRR bit would newly become set while in this
state. As a result it is also wrong for us to mark IO-APIC or MSI
originating vectors as having a pending request when the vLAPIC is in
this state. Such interrupts are simply lost.

Introduce (IO-APIC) or re-use (MSI) a local variable to help
readability.

Fixes: 4fe21ad3712e ("This patch add virtual IOAPIC support for VMX guest")
Fixes: 85715f4bc7c9 ("MSI 5/6: add MSI support to passthrough HVM domain")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
master commit: f1d7aac1e3c3cd164e17d41791a575a5c3e87121
master date: 2022-12-02 10:35:01 +0100
xen/arch/x86/hvm/vioapic.c
xen/arch/x86/hvm/vmsi.c